package com.example.warehouse.bus.dao.persist.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.warehouse.bus.pojo.entity.BusRepertory;
import com.example.warehouse.bus.pojo.vo.BusRepertoryInfoVo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BusRepertoryMapper extends BaseMapper<BusRepertory> {
    //通过商品id关联查询商品名称
    String findBuGoodsIdToGoodsName(Long goodsId);
    //修改商品数量(新增)
    void AddGoodsNum(Integer goodsNum,String goodsName);
    //根据商品名称查出该商品数据
    BusRepertory findBuGoodsNameData(String goodsName);
    //修改商品数量(减少)
    void reduceGoodsNum(Integer goodsNum,String goodsName);
    //查询数据库库存数量
    Integer selectByGoodsNameStockNum(String goodsName);
    //分页查询
    List<BusRepertoryInfoVo> list();
    //通过关键字模糊查询后的分页查询
    List<BusRepertoryInfoVo> fuzzyQueryList(String keyword);

}
